#include <string>

using namespace std;

class Solution
{
public:
    int tmp[26];
    char firstUniqChar(string s)
    {
        char ret = ' ';
        for (auto e : s)
        {
            ++tmp[e - 'a'];
        }

        for (auto e : s)    
        {
            if (tmp[e - 'a'] == 1)
            {
                ret = e;
                break;
            }
        }
        return ret;
    }
};